<%@page import="com.enterprise.domain.Page"%>
<%@page import="com.enterprise.daoImpl.PageDaoImpl"%>
<%@page import="com.enterprise.domain.Aboutus"%>
<%@page import="com.enterprise.daoImpl.AboutusDaoImpl"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ include file="Inc/Head.jsp" %>

<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗？"))
     return true;
   else
     return false;
}
</script>
<center>
<table  width="100%" height="80%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr>
          <td width="550" height="25" class="back_southidc"> 
            <div align="center"><strong>栏目管理</strong></div></td>
        </tr>
        <tr> 
          <td height="66"> 
            <div align="center">
              <table width="80%" height="62" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000" class="border">
                <tbody><tr bgcolor="#ECF5FF" class="title"> 
                  <td width="78" align="center"><strong>排序号</strong></td>
                  <td width="94" align="center"><strong>语种</strong></td>
                  <td width="265" height="29" align="center"><strong> 栏目名称</strong></td>
                  <td width="108" align="center"><strong> 操作</strong></td>
                </tr>
                  		<%
      			PageDaoImpl pageDaoImpl=new PageDaoImpl();
      			int currentPage=1;
				if(request.getParameter("pageNo")!=null){
					currentPage=Integer.parseInt(request.getParameter("pageNo"));
				}   		
				Page page2=new Page(10,pageDaoImpl.getAboutusRecourd(),currentPage);
				currentPage=page2.getCurrentPage();
      		
                	AboutusDaoImpl aboutusDaoImpl=new AboutusDaoImpl();
                	ArrayList<Aboutus> arrayList=(ArrayList)aboutusDaoImpl.getAboutusList();
                	if(arrayList!=null){
                	int i;
                for(i=page2.getFromIndex();i<page2.getToIndex();i++){
                	
                %>
                <%		
                { 
             
                	Aboutus aboutus=arrayList.get(i);
                %>
                	
                <tr class="tdbg"> 
                  <td align="center" bgcolor="#ECF5FF"><%=aboutus.getId()%></td>
                  <td align="center" bgcolor="#ECF5FF">
				  中文</td>
                  <td height="28" align="center" bgcolor="#ECF5FF"><%=aboutus.getTitle()%></td>
                  <td align="center" bgcolor="#ECF5FF">
				   
				  <a href="../Aboutus.jsp?Title=<%=aboutus.getTitle() %>" target="_blank">查看</a>&nbsp; 				  
				  
                    &nbsp;<a href='AdminAboutusModify.jsp?ID=<%=aboutus.getMyid()%>&&Aboutusorder=<%=aboutus.getId() %>&&Title=<%=aboutus.getTitle()%>&&content=<%=aboutus.getContent()%>'>修改</a>&nbsp; 
                    &nbsp;<a href="aboutus-delete.action?ID=<%=aboutus.getMyid()%>" onclick="return ConfirmDel();">删除</a></td>
                </tr>
              <%}} }%>
              </tbody></table>
            </div></td>
        </tr>
      </tbody>
      
      </table>
      </center>
      <center>
      
      	<form name="showpages" method="Post" action="AdminAboutus.asp">
      		<table align="center" width="80%"  border="0" cellpadding="0" cellspacing="0">
      		<tbody>
    
      			<tr><td align="center">共 <b><%=arrayList.size() %></b> 条记录&nbsp;&nbsp;<a href="AdminAboutus.jsp?pageNo=1">首页</a><a href="AdminAboutus.jsp?pageNo=<%=currentPage-1%>"> 上一页</a>&nbsp;<a href="AdminAboutus.jsp?pageNo=<%=currentPage+1%>">下一页<a href="AdminAboutus.jsp?pageNo=<%=page2.getPageCount()%>">&nbsp;尾页</a> &nbsp;页次：<strong><font color="red"><%=currentPage %></font>/<%=page2.getPageCount() %></strong>页 &nbsp;<b>10</b>条记录/页&nbsp;转到：
      			<select name="pageNo" size="1" onchange="javascript:submit()">
      			<%
      				int i;
      				for(i=1;i<=page2.getPageCount();i++){ %>
      				<option value="<%=i%>" <%if(i==currentPage){%> <%{%>selected='selected'<%}}%>>第<%=i%>页</option>
      				<%}%>
      			</select></td></tr></tbody></table>
      	</form>
      		
      			</center>
<%@include file="Inc/Foot.jsp" %>